package com.yhx.testDemo;

import com.yhx.myDemo.Student;
import com.yhx.security.gfoBank.api.com.test.MD5;
import com.yhx.share.thisShare.Md5SHA1Utils;

import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * @Author: mishuai
 * @Date: 2020/5/8 5:52 下午
 */
public class test {
    /*public static void main(String[] args) {
        *//*long phone=13937037144l;
        long str= phone >>1;
        System.out.println(str);
        str=str << 1;
        System.out.println(str);*//*

        *//* double d = 114.1451112;
         BigDecimal b = new BigDecimal(d);
         d = b.setScale(6, BigDecimal.ROUND_HALF_UP).doubleValue();
         System.out.println(d);
*//*

        String longitude="33.0000";
        Double d=Double.parseDouble(longitude);
        Double longitudeDouble = new BigDecimal(longitude).doubleValue();
        System.out.println(longitudeDouble);
        System.out.println(d);
         //System.out.println(9 % 2);

        try{
            double a=0%1;
            System.out.println(a);
        }catch (Throwable e){
            System.out.println(e);
        }

    }*/


    public static void main(String[] args) throws Exception{
        Students students=new Students();
        //students.setAgeInt(0);
        Integer a=students.getAgeInt();
        //a=2;
        //System.out.println(a);
       // System.out.println(getRealRootUrl("/export/content/hermes.jdpay.front-pre-20201215T100331037/WEB-INF/classes"));
        //String regx="^[1-9][\d]*([,][\d])*$";
        String regex = "^[0-9,]+$";
        Pattern pattern = Pattern.compile(regex);
        String str="61,2356,032223, ";
        Matcher match = pattern.matcher(str.trim());
        System.out.println(match.matches());;
        System.out.println();
    }


    public static String getRealRootUrl(String path){
        int index = path.indexOf("WEB-INF");

        if(index == -1){
            index = path.indexOf("classes");
        }
        path = path.substring(0, index);
        return path;
    }

    public static int getValue(){

        ArrayList<String> arrayList=new ArrayList<>();
        int value=2;
        Integer i=null;
        try {
            System.out.println( value * value);
            value=value * value;
            i.toString();
            return value;
        }catch (Exception e){
            return 1;
        }finally {
             value=value * 2;
            System.out.println(value);
            value=4;
             i.toString();

            if (value == 4) {
                System.out.println(0);
                return value;
            }
        }
    }




}



